/*
 * based off of https://github.com/gitterHQ/sidecar
 * license: MIT
 */
.map-aside {
    width:500px;

    z-index: 20000;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;

    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: row;
    flex-direction: row;
    background-color: @body-bg;
    border-left: 1px solid #ddd;
    box-shadow: -12px 0 18px 0 rgba(50, 50, 50, 0.1);

    transition: transform 0.3s cubic-bezier(0.16, 0.22, 0.22, 1.7);

    &.is-collapsed:not(.is-loading) {
      -webkit-transform: translateX(110%);
      transform: translateX(110%);
    }

    /* Add some "extension" so that there isn't a gap
     * when we translate(via animation) more than 100% */
    &:after {
      content: '';

      z-index: -1;
      position: absolute;
      top: 0;
      left: 100%;
      bottom: 0;
      right: -100%;

      background-color: @body-bg;
    }
    iframe {
      width: 100%;
      height: 100%;
    }
}

.map-aside-action-bar {
    position: absolute;
    top: 0;
    right: 0;

    display: -webkit-flex;
    display: flex;
    justify-content: flex-end;

    padding-bottom: 5px;
    padding-right:10px;
    padding-top:5px;
    z-index: 100;
}

.map-fixed-header {
  position: fixed;
  background: white;
  padding-top: 5px;
  width: 100%;
  z-index: 1;
  left: 0;
  top: 0;
  @media (max-width: 720px) {
    padding-top:30px;
  }
  p {
  margin: 5px 0 20px;
    @media (max-width: 720px) {
      margin-bottom:10px;
    }
  }
  hr {
    margin:30px 0;
    @media (max-width: 720px) {
      margin:25px 0;
    }
  }
  .flashMessage {
    position:fixed;
    margin: 0 auto;
    z-index: 2;
    top: 160px;
    width: 100%;
  }
 }

.map-buttons {
  margin-top: -10px;
  & button,
  & .input-group{
    width:300px;
  }
  .input-group{
    margin-top: 15px;
    margin-left: auto;
    margin-right: auto;
  }
}

#map-filter {
    background:#fff;
    border-color: darkgreen;
}
.input-group-addon {
  width:40px;
  color: darkgreen;
  background: #fff;
  border-color: darkgreen;
  &.filled{
    background: darkgreen;
    border-color: #000d00;
    color: #fff;
    cursor: pointer;
  }
  .fa {
    position:absolute;
    top:50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    right:10px;
  }
}

.mapWrapper {
  position:absolute;
  display: block;
  height: 100%;
  width: 100%; 
}

.map-accordion {
  width:700px; 
  margin:155px auto 0; 
  position:relative;
  #nested {
    margin:0 10px;
    @media (max-width: 400px) {
    margin:0;
    }
  }
  a:focus {
      text-decoration: none;
      color:darkgreen;
  }
  a:focus:hover {
      text-decoration: underline;
      color:#001800;
  }
  h2 > a {
      width:100%;
      display:block;
      background:#efefef;
      padding:10px 0;
      padding-left:50px;
      padding-right:20px;
    }

  h3 {
    margin:15px 0;
    padding:0;
    &:first-child {
      margin-top:25px
    }
    > a {
      padding-left: 40px;
      padding-bottom: 10px;
      display:block;
      max-width: 535px;
    }
  }

  div.chapterBlock {
    :before {
      margin-right: 15px;
    }
    p {
      text-indent: -15px;
      margin-left: 60px;
      padding-right: 20px;
      @media (max-width: 400px) {
          margin-left:30px;
      }
    }
  }

  .challengeBlockDescription {
      margin:0;
      margin-top:-10px;
      padding:0 15px 23px 30px;
    }

  span.no-link-underline {
    position:absolute;
    margin-left:-30px;
    color: #666;
  }

  div > div:last-child {
    margin-bottom:30px
  }
}
.challengeBlockTime {
  font-size: 18px;
  color: #BBBBBB;
  display:block;
  margin-left: 40px;
  margin-bottom: 20px;
  @media (min-width: 721px) {
    margin-right: 20px;
    margin-top:-30px;
    float:right;
  }
}

@media (max-width: 720px) {
  .map-accordion {
    left:0;
    right:0;
    width:100%;
    top:195px;
    bottom:0;
    margin:0;
    position:absolute;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    h2 {
      margin:15px 0;
      padding:0;
      &:first-of-type {
        margin-top:0;
      }
      > a {
        padding:10px 0;
        padding-left:50px;
        padding-right:20px;
        font-size:20px;
      }
    }
    h3 {
      margin:10px 0;
      padding:0;
      > a {
        clear:both;
        font-size:20px;
      }
    }
  }
}
    
.map-aside-action-item {
    display: -webkit-flex;
    display: flex;
    /* main axis */
    justify-content: center;
    /* cross axis */
    align-items: center;

    width: 40px;
    height: 40px;

    padding-left: 0;
    padding-right: 0;

    opacity: 0.65;
    background: none;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 22px 22px;
    border: 0;
    outline: none;

    cursor: pointer;
    cursor: hand;

    transition: all 0.2s ease;

    &:hover,
    &:focus {
      opacity: 1;
    }

    &:active {
      filter: hue-rotate(80deg) saturate(150);
    }
}

#noneFound {
    display:none;
    margin:60px 30px 0;
    font-size:30px;
    text-align: center;
    color:darkgreen;
    .fa {
      display:block;
      font-size:300px;
    }
}

.map-aside-action-pop-out {
    margin-right: -4px;
    background-image: url()
}

.map-aside-action-collapse {
    background-image: url()
}
